import itertools as it
import functools as ft
import unittest
#sum of all multiple of 3 and 5 below 1000
def f(n):
	return [x for x in range(n) if x%3==0]+[x for x in range(n) if x%5==0]
def simplify(lst):
	return list(set(lst))

def one(n):
	#return ft.reduce( lambda x,y: x+y, simplify(f(n)) )
	return simplify(f(n))

print(one(1000))

class test(unittest.TestCase):
	def test_multiplicity(self):
		lst = one(1000)
		for i in lst:
			self.assertTrue( lst.count(i) ==1, "lst.count({0}) = {1}".format(i, lst.count(i) ))
	def test_35(self):
		lst = one(1000)
		for i in lst:
			self.assertTrue( (i%3==0) or (i%5==0) , "{0} is not divisble for 5 neither 3??".format(i))

if __name__ == "__main__":
	unittest.main()
	print("dud")
	print(one(1000))

